<?php

class Teams extends CI_Controller {

	public function __construct()
	{
		parent::__construct();
		$this->load->model("teams_db");
	}
	
	public function allteams()
	{
		$data['base'] = $this->config->item('base_url');
		$data['css'] = $data['base'].$this->config->item('css');
		$data['images'] = $data['base'].$this->config->item('images');
		$data['js'] = $data['base'].$this->config->item('js');
		
	
		$data["teams"] = $this->teams_db->get_teams();
		

		
		$this->load->view('templates/header', $data);
		$this->load->view('teams/index', $data);
		$this->load->view('templates/footer');
		
	}
	
	public function display($school = "blackfoot")
	{	
		$data['base'] = $this->config->item('base_url');
		$data['css'] = $data['base'].$this->config->item('css');
		$data['images'] = $data['base'].$this->config->item('images');
		$data['js'] = $data['base'].$this->config->item('js');
	
	
		$data["team"] = $this->teams_db->get_a_team($school);
		
		$this->load->view('templates/header', $data);
		//print_r($data);
		$this->load->view('teams/players', $data);
		$this->load->view('templates/footer');
		
	}

	
}